#ifndef GULLENGINE_TRANSFORNCONTROLLER_H
#define GULLENGINE_TRANSFORMCONTROLLER_H

#include "NodeController.h"
#include "Vector3D.h"
#include "Matrix4x3.h"

namespace gull {
	namespace core {
		
		class TransformController: public NodeController{
		public:
			
			TransformController(ISceneNode* node);
			~TransformController();
			
			inline const Vector3D* getPosition() const;
			inline void setPosition(const Vector3D& v);
            
			inline void setTransform(const Matrix4x3& tansform);
			inline const Matrix4x3* getTransform() const;
			inline Matrix4x3* getTransform();
			void rotateAboutAxis(const Vector3D& v, double degree);
			
			inline const Matrix4x3* getMatrix() const;
			inline Matrix4x3* getMatrix();
			inline void setMatrix(const Matrix4x3& m);
			
            
        protected:
			
			
        private:
            Matrix4x3 m_transform;
        };
		
		const Vector3D* TransformController::getPosition() const{
			return (&m_transform[3]);
		}
		
		void TransformController::setPosition(const Vector3D& v){
			m_transform[3] = v;
		}
        
		void TransformController::setTransform(const Matrix4x3& transform){
			m_transform = transform;
		}
		
		const Matrix4x3* TransformController::getTransform() const{
			return &m_transform;
		}
		
		Matrix4x3* TransformController::getTransform(){
			return &m_transform;
		}
		
		void
		TransformController::setMatrix(const Matrix4x3& m){
			setTransform(m);
		}
		
		const Matrix4x3*
		TransformController::getMatrix() const{
			return getTransform();
		}
		
		Matrix4x3*
		TransformController::getMatrix(){
			return getTransform();
		}
		
	}
}



#endif